﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="SellerViewBuyer.aspx.cs" Inherits="FYPHP.SellerViewBuyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="LeftContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Repeater ID="ItemList" runat="server" EnableViewState=false
        onitemcommand="ItemList_ItemCommand">
        <HeaderTemplate>
            <h2>
                View Buyer Detail (Haven't Shipped)</h2>
            <table cellpadding="5" cellspacing="5" width="722" border="1px solid #ffffff" align="center" style="border-collapse: collapse; border-color: #aaaaaa; text-align: center; margin-top: 5px">
                <tr style="background-color: #eee; font-weight: bold;">
                    <td width="30px">
                        No.</td>
                    <td>
                        Reference No.</td>
                    <td>
                        Buyer</td>
                    <td>
                        Total</td>
                    <td>
                        Status</td>
                    <td>
                        Action</td>
                </tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr>
                <td>
                    <script type="text/javascript">

                      num += 1; document.write(num);
                      </script>
                </td>
                <td>
                    <%#formatRef(DataBinder.Eval(Container.DataItem, "t_id" )) %>
                </td>
                <td width="80">
                    <%#DataBinder.Eval(Container.DataItem, "username" ) %>
                </td>
                <td width="80">
                     $<%#DataBinder.Eval(Container.DataItem, "t_total" ) %>
                </td>
                <td width="120">
                    <%# ShowStatus(DataBinder.Eval(Container.DataItem, "t_status"))%>
                </td>
                <td width="130">
                    <asp:Button ID="btnView" runat="server" Text="View" CommandName="View" CommandArgument='<%# Eval("t_id").ToString() %>' />
                &nbsp;
                  <asp:Button ID="btnShip" runat="server" Text="Shipping" CommandName="Shipped" CommandArgument='<%# Eval("t_id").ToString() %>' />
                </td>
            </tr>
        </ItemTemplate>
        <FooterTemplate>
            </table>
        </FooterTemplate>
    </asp:Repeater>

    <br />
    <asp:Repeater ID="ItemList0" runat="server" EnableViewState=false
        onitemcommand="ItemList_ItemCommand">
        <HeaderTemplate>
            <h2>View Buyer Detail (Shipped)</h2>
            <table cellpadding="5" cellspacing="5" width="722" border="1px solid #ffffff" align="center" style="border-collapse: collapse; border-color: #aaaaaa; text-align: center; margin-top: 5px">
                <tr style="background-color: #eee; font-weight: bold;">
                    <td width="30px">
                        No.</td>
                    <td>
                        Reference No.</td>
                    <td>
                        Buyer</td>
                    <td>
                        Total</td>
                    <td>
                        Status</td>
                    <td>
                        Action</td>
                </tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr>
                <td>
                    <script type="text/javascript">

                      num += 1; document.write(num);
                      </script>
                </td>
                <td>
                    <%#formatRef(DataBinder.Eval(Container.DataItem, "t_id" )) %>
                </td>
                <td width="80">
                    <%#DataBinder.Eval(Container.DataItem, "username" ) %>
                </td>
                <td width="80">
                     $<%#DataBinder.Eval(Container.DataItem, "t_total" ) %>
                </td>
                <td width="120">
                    <%# ShowStatus(DataBinder.Eval(Container.DataItem, "t_status"))%>
                </td>
                <td width="130">
                    <asp:Button ID="btnView0" runat="server" Text="View" CommandName="View" 
                        CommandArgument='<%# Eval("t_id").ToString() %>' />
                </td>
            </tr>
        </ItemTemplate>
        <FooterTemplate>
            </table>
        </FooterTemplate>
    </asp:Repeater>

    </br>
</asp:Content>
